package com.hanserwei.community.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hanserwei.community.entity.po.House;
import com.hanserwei.community.entity.request.house.HouseAddRequest;
import com.hanserwei.community.entity.request.house.HouseQueryRequest;
import com.hanserwei.community.entity.vo.HouseVO;

import java.util.List;

public interface HouseService extends IService<House>{

    /**
     * 分页查询房屋列表
     */
    Page<HouseVO> queryHouseByPage(HouseQueryRequest request);

    /**
     * 获取查询条件包装器
     */
    QueryWrapper<House> getQueryWrapper(HouseQueryRequest request);

    /**
     * 分页查询房屋列表（简单分页）
     */
    Page<HouseVO> listByPage(Integer currentNumber, Integer pageSize);

    /**
     * 添加房屋
     */
    boolean addHouse(HouseAddRequest request);

    /**
     * 更新房屋信息
     */
    boolean updateHouse(HouseAddRequest request, Integer id);

    /**
     * 根据建筑物ID查询房屋列表
     */
    List<HouseVO> getHousesByBuildingId(Integer buildingId);

    /**
     * 获取房屋VO对象
     */
    HouseVO getHouseVO(House house);

    /**
     * 获取房屋VO列表
     */
    List<HouseVO> getHouseVOList(List<House> houseList);
}
